# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=piper
pkgver=0.8
pkgrel=0
pkgdesc="GTK+ application to configure gaming mice using ratbag"
url="https://github.com/libratbag/piper"
arch="noarch"
license="GPL-2.0-only"
depends="python3 py3-evdev py3-cairo py3-lxml py3-gobject3 ratbag"
makedepends="
	desktop-file-utils
	gettext
	glib-dev
	gtk-update-icon-cache
	meson
	"
checkdepends="appstream py3-flake8 bash"
subpackages="$pkgname-lang $pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/libratbag/piper/archive/refs/tags/$pkgver.tar.gz"

build() {
	abuild-meson \
		-Druntime-dependency-checks=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
c0a05262262a1284911c976ab934653f8a3699066ef1d791669169c1e6c5db62dba0fcccc32d6bc68b996a2c2b8e96a6567761d01417a03d7dbb41010dd95cd8  piper-0.8.tar.gz
"
